import 'package:fwanandroid/model/bean/SystemChild.dart';
import 'package:json_annotation/json_annotation.dart';

part 'SystemParent.g.dart';

@JsonSerializable(explicitToJson: true)
class SystemParent {
  final int id;
  final int courseId;
  final String name;
  final int order;
  final int parentChapterId;
  final int visible;
  final bool userControlSetTop;
  final List<SystemChild> children;

  SystemParent(this.id, this.courseId, this.name, this.order, this.parentChapterId, this.visible, this.userControlSetTop, this.children);

  factory SystemParent.fromJson(Map<String, dynamic> json) =>
      _$SystemParentFromJson(json);

  Map<String, dynamic> toJson() => _$SystemParentToJson(this);
}
